package com.itheima.homework5;

import java.io.File;

public class Demo5_DiGui_File {
    public static void main(String[] args) {
        File srcFile = new File("F:/壁纸");
        getAllFilePath(srcFile);
    }

    public static void getAllFilePath(File srcFile) {
        File[] srcArr = srcFile.listFiles();
        if (srcArr!=null) {
            for (File file : srcArr) {
                if (file.isDirectory()) {
                    getAllFilePath(file);
                }else {
                    System.out.println(file.getAbsolutePath());
                }
            }
        }
    }
}
